
interface User {
    loginname: string;
    password: string;
}

// 导入axios实例
import http from '../utils/http';

// 登录
export const login = (info: User) => http.post('/user/login', info)

// 电话
export const testTelHanlder = (tel: string) => http.post('/user/docheckphone', { tel })

// 发送验证码
export const sendCodeHanlder = (tel: string) => http.post('/user/dosendmsgcode', { tel })

// 验证验证码
export const testCodeHanlder = (tel: string, telcode: string) => http.post('/user/docheckcode', { tel, telcode })

// 注册
export const registerHanlder = (tel: string, password: string) => http.post('/user/dofinishregister', { tel, password })